3.8 \(\int \frac {a+b \tan ^{-1}(c x)}{x^2} \, dx\)

Optimal. Leaf size=35 \[ -\frac {a+b \tan ^{-1}(c x)}{x}-\frac {1}{2} b c \log \left (c^2 x^2+1\right )+b c \log (x) \]

[Out]

(-a-b*arctan(c*x))/x+b*c*ln(x)-1/2*b*c*ln(c^2*x^2+1)

________________________________________________________________________________________

Rubi [A]  time = 0.02, antiderivative size = 35, normalized size of antiderivative = 1.00, number of steps used = 5, number of rules used = 5, integrand size = 12, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.417, Rules used = {4852, 266, 36, 29, 31} \[ -\frac {a+b \tan ^{-1}(c x)}{x}-\frac {1}{2} b c \log \left (c^2 x^2+1\right )+b c \log (x) \]

Antiderivative was successfully verified.

[In]

Int[(a + b*ArcTan[c*x])/x^2,x]

[Out]

-((a + b*ArcTan[c*x])/x) + b*c*Log[x] - (b*c*Log[1 + c^2*x^2])/2

Rule 29

Int[(x_)^(-1), x_Symbol] :> Simp[Log[x], x]

Rule 31

Int[((a_) + (b_.)*(x_))^(-1), x_Symbol] :> Simp[Log[RemoveContent[a + b*x, x]]/b, x] /; FreeQ[{a, b}, x]

Rule 36

Int[1/(((a_.) + (b_.)*(x_))*((c_.) + (d_.)*(x_))), x_Symbol] :> Dist[b/(b*c - a*d), Int[1/(a + b*x), x], x] -
Dist[d/(b*c - a*d), Int[1/(c + d*x), x], x] /; FreeQ[{a, b, c, d}, x] && NeQ[b*c - a*d, 0]

Rule 266

Int[(x_)^(m_.)*((a_) + (b_.)*(x_)^(n_))^(p_), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplify[(m + 1)/n] - 1)*(a
+ b*x)^p, x], x, x^n], x] /; FreeQ[{a, b, m, n, p}, x] && IntegerQ[Simplify[(m + 1)/n]]

Rule 4852

Int[((a_.) + ArcTan[(c_.)*(x_)]*(b_.))^(p_.)*((d_.)*(x_))^(m_.), x_Symbol] :> Simp[((d*x)^(m + 1)*(a + b*ArcTa
n[c*x])^p)/(d*(m + 1)), x] - Dist[(b*c*p)/(d*(m + 1)), Int[((d*x)^(m + 1)*(a + b*ArcTan[c*x])^(p - 1))/(1 + c^
2*x^2), x], x] /; FreeQ[{a, b, c, d, m}, x] && IGtQ[p, 0] && (EqQ[p, 1] || IntegerQ[m]) && NeQ[m, -1]

Rubi steps

\begin {align*} \int \frac {a+b \tan ^{-1}(c x)}{x^2} \, dx &=-\frac {a+b \tan ^{-1}(c x)}{x}+(b c) \int \frac {1}{x \left (1+c^2 x^2\right )} \, dx\\ &=-\frac {a+b \tan ^{-1}(c x)}{x}+\frac {1}{2} (b c) \operatorname {Subst}\left (\int \frac {1}{x \left (1+c^2 x\right )} \, dx,x,x^2\right )\\ &=-\frac {a+b \tan ^{-1}(c x)}{x}+\frac {1}{2} (b c) \operatorname {Subst}\left (\int \frac {1}{x} \, dx,x,x^2\right )-\frac {1}{2} \left (b c^3\right ) \operatorname {Subst}\left (\int \frac {1}{1+c^2 x} \, dx,x,x^2\right )\\ &=-\frac {a+b \tan ^{-1}(c x)}{x}+b c \log (x)-\frac {1}{2} b c \log \left (1+c^2 x^2\right )\\ \end {align*}

________________________________________________________________________________________

Mathematica [A]  time = 0.00, size = 38, normalized size = 1.09 \[ -\frac {a}{x}-\frac {1}{2} b c \log \left (c^2 x^2+1\right )+b c \log (x)-\frac {b \tan ^{-1}(c x)}{x} \]

Antiderivative was successfully verified.

[In]

Integrate[(a + b*ArcTan[c*x])/x^2,x]

[Out]

-(a/x) - (b*ArcTan[c*x])/x + b*c*Log[x] - (b*c*Log[1 + c^2*x^2])/2

________________________________________________________________________________________

fricas [A]  time = 0.43, size = 37, normalized size = 1.06 \[ -\frac {b c x \log \left (c^{2} x^{2} + 1\right ) - 2 \, b c x \log \relax (x) + 2 \, b \arctan \left (c x\right ) + 2 \, a}{2 \, x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(c*x))/x^2,x, algorithm="fricas")

[Out]

-1/2*(b*c*x*log(c^2*x^2 + 1) - 2*b*c*x*log(x) + 2*b*arctan(c*x) + 2*a)/x

________________________________________________________________________________________

giac [F]  time = 0.00, size = 0, normalized size = 0.00 \[ \mathit {sage}_{0} x \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(c*x))/x^2,x, algorithm="giac")

[Out]

sage0*x

________________________________________________________________________________________

maple [A]  time = 0.01, size = 39, normalized size = 1.11 \[ -\frac {a}{x}-\frac {b \arctan \left (c x \right )}{x}+c b \ln \left (c x \right )-\frac {b c \ln \left (c^{2} x^{2}+1\right )}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a+b*arctan(c*x))/x^2,x)

[Out]

-a/x-b/x*arctan(c*x)+c*b*ln(c*x)-1/2*b*c*ln(c^2*x^2+1)

________________________________________________________________________________________

maxima [A]  time = 0.33, size = 39, normalized size = 1.11 \[ -\frac {1}{2} \, {\left (c {\left (\log \left (c^{2} x^{2} + 1\right ) - \log \left (x^{2}\right )\right )} + \frac {2 \, \arctan \left (c x\right )}{x}\right )} b - \frac {a}{x} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*arctan(c*x))/x^2,x, algorithm="maxima")

[Out]

-1/2*(c*(log(c^2*x^2 + 1) - log(x^2)) + 2*arctan(c*x)/x)*b - a/x

________________________________________________________________________________________

mupad [B]  time = 0.32, size = 36, normalized size = 1.03 \[ b\,c\,\ln \relax (x)-\frac {a}{x}-\frac {b\,\mathrm {atan}\left (c\,x\right )}{x}-\frac {b\,c\,\ln \left (c^2\,x^2+1\right )}{2} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

int((a + b*atan(c*x))/x^2,x)

[Out]

b*c*log(x) - a/x - (b*atan(c*x))/x - (b*c*log(c^2*x^2 + 1))/2

________________________________________________________________________________________

sympy [A]  time = 0.63, size = 37, normalized size = 1.06 \[ \begin {cases} - \frac {a}{x} + b c \log {\relax (x )} - \frac {b c \log {\left (x^{2} + \frac {1}{c^{2}} \right )}}{2} - \frac {b \operatorname {atan}{\left (c x \right )}}{x} & \text {for}\: c \neq 0 \\- \frac {a}{x} & \text {otherwise} \end {cases} \]

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate((a+b*atan(c*x))/x**2,x)

[Out]

Piecewise((-a/x + b*c*log(x) - b*c*log(x**2 + c**(-2))/2 - b*atan(c*x)/x, Ne(c, 0)), (-a/x, True))

________________________________________________________________________________________